Parameterized Memory Models and Concurrent Separation Logic (extended version)
نویسندگان
چکیده
Formal reasoning about concurrent programs is usually done with the assumption that the underlying memory model is sequentially consistent, i.e. the execution outcome is equivalent to an interleaving of instructions according to the program order. However, memory models in reality are weaker in order to accommodate compiler and hardware optimizations. To simplify the reasoning, many memory models provide a guarantee that data-race-free programs behave in a sequentially consistent manner, the so-called DRFguarantee. The DRF-guarantee removes the burden of reasoning about relaxations when the program is well-synchronized. In this paper, we formalize relaxed memory models by giving a parameterized operational semantics to a concurrent programming language. Behaviors of a program under a relaxed memory model are defined as behaviors of a set of related programs under the sequentially consistent model. This semantics is parameterized in the sense that different memory models can be obtained by using different relations between programs. We present one particular relation that we believe accounts for the majority of memory models and sequential optimizations. We then show that the derived semantics has the DRF-guarantee, using a notion of race-freedom captured by an operational grainless semantics. Our grainless semantics also bridges concurrent separation logic (CSL) and relaxed memory models naturally, which allows us to finally prove the folklore theorem that CSL is sound with relaxed memory models.
منابع مشابه
Parameterized Memory Models and Concurrent Separation Logic
In this paper, we formalize relaxed memory models by giving a parameterized operational semantics to a concurrent programming language. Behaviors of a program under a relaxed memory model are defined as behaviors of a set of related programs under the sequentially consistent model. This semantics is parameterized in the sense that different memory models can be obtained by using different relat...
متن کاملFine-grained Concurrency with Separation Logic
Reasoning about concurrent programs involves representing the information that concurrent processes manipulate disjoint portions of memory. In sophisticated applications, the division of memory between processes is not static. Through operations, processes can exchange the implied ownership of memory cells. In addition, processes can also share ownership of cells in a controlled fashion as long...
متن کاملPermission Accounting in Separation Logic ( extended abstract )
Separation logic began by describing total separation between the heap space used by separate parts of a program. It has moved on to consider how total and partial permissions to access heap elements can be transferred between concurrent threads. The roots of the new approach are in Boyland’s [3] demonstration of the utility of fractional permissions in reasoning about programs. We add the noti...
متن کاملOracle Semantics for Concurrent Separation Logic (preliminary version)
We define in Coq with machine-checked proofs a modular operational semantics for Concurrent C minor, a language with shared memory, spawnable threads, and firstclass locks. By modular we mean that one can reason about sequential control and data-flow knowing almost nothing about concurrency, and one can reason about concurrency knowing almost nothing about sequential control and dataflow constr...
متن کاملTackling Real-Life Relaxed Concurrency with FSL++
We extend fenced separation logic (FSL), a program logic for reasoning about C11 relaxed access and memory fences. Our extensions to FSL allow us to handle concurrent algorithms appearing in practice. New features added to FSL allow for reasoning about concurrent nonatomic reads, atomic updates, ownership transfer via release sequences, and ghost state. As a demonstration of power of the extend...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2010